/**
 *
 * utils入口类
 * Created by cmd on 2018/6/15.
 */

let exp = module.exports;

/**
 * 根据uid随机分配到一台连接服
 * @param uid
 * @param connectors
 * @return {*}
 */
exp.dispatch = function (uid, connectors) {
    let index = Number(uid) % connectors.length;
    return connectors[index];
};